package foalvleditor.core;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;

/**
 * This class is part of MVC yet to be implemented.
 */

public abstract class AbstractModel{

	    protected PropertyChangeSupport pcs;

	    public AbstractModel()
	    {
	    	pcs = new PropertyChangeSupport(this);
	    }

	    public void addPropertyChangeListener(String namn, PropertyChangeListener pcl) {
	    	pcs.addPropertyChangeListener(namn, pcl);
	    }

	    public void addPropertyChangeListener(PropertyChangeListener pcl) {
	    	pcs.addPropertyChangeListener(pcl);
	    }

	    public void removePropertyChangeListener(PropertyChangeListener pcl) {
	    	pcs.removePropertyChangeListener(pcl);
	    }

	    public void removePropertyChangeListener(String namn, PropertyChangeListener pcl) {
	    	pcs.removePropertyChangeListener(namn, pcl);
	    }

	    protected void firePropertyChange(String propertyName, Object oldValue, Object newValue) {
	    	pcs.firePropertyChange(propertyName, oldValue, newValue);
	    }
	}
